package main

import (
	"fmt"
	"os"
	"runtime"
	"tcp-scan-FullConn/utils"
)

func main() {
	if len(os.Args) == 3 {
		ipList := os.Args[1]
		portList := os.Args[2]
		ips, err := utils.GetIpList(ipList)
		ports, err := utils.GetPorts(portList)
		_ = err

		task, _ := utils.GenerateTask(ips, ports)
		utils.AssigningTasks(task)
		utils.PrintReslt()

	} else {
		fmt.Printf("%v iplist port\n", os.Args[0])
	}
}
func init() {
	runtime.GOMAXPROCS(runtime.NumCPU())
}
